<template>
  <div>
    <avue-crud
      ref="crud"
      style="width: 100%"
      :data="loadData"
      :option="tableOption"
      :table-loading="loading"
    >
      <template slot="menu" slot-scope="scope">
        <el-button
          type="text"
          icon="el-icon-view"
          @click="gongzuojilu(scope.row)"
          >工单记录</el-button
        >
        <!-- <el-button
          type="text"
          icon="el-icon-sold-out"
          @click="refund(scope.row)"
          >退款</el-button
        > -->
      </template>
    </avue-crud>
    <template>
      <div style="width: 100%; position: relative; height: 100px">
        <el-pagination
          :page-sizes="[10, 20, 30, 40, 50, 100]"
          :pager-count="7"
          :current-page="page.current"
          :page-size="page.size"
          :total="page.total"
          layout="total, sizes, prev, pager, next, jumper"
          style="margin: 2% 0; position: absolute; right: 1%"
          background
          @size-change="sizeChange"
          @current-change="currentChange"
        ></el-pagination>
      </div>
    </template>

    <el-dialog
      title="工单记录"
      destroy-on-close
      :visible.sync="dialogVisible"
      width="45%"
    >
      <avue-crud
        style="width: 100%"
        :data="gdjlloadData"
        :option="gdjltableOption"
        :table-loading="gdjlloading"
      >
        <template slot="workorderStatus" slot-scope="scope">
          <span>{{
            scope.row.workorderStatusDesc +
            (scope.row.rejectReason ? "(" + scope.row.rejectReason + ")" : "")
          }}</span>
        </template></avue-crud
      >
    </el-dialog>
    <refund ref="refund" />
  </div>
</template>

<script src='./partialReturn.js'></script>

<style lang="scss">
</style>